#! /bin/sh
# The idea is to low pass filter the data to get rid of the ground
# roll.  Since the raw data is dominated by the ground roll, apply
# suspecfx to the raw data to estimate the ground roll frequency content.
WIDTH=600
HEIGHT=450
WIDTHOFF1=0
WIDTHOFF2=640
HEIGHTOFF1=50
HEIGHTOFF2=530

perc=90   # accept value in Scales book
tpow=3.2  # accept value in oz25.H

suxmovie <data.su  \
	title="Original Data" windowtitle="Raw Data"\
	label1="Time (sec)" label2="Offset (km)" \
	-geometry ${WIDTH}x${HEIGHT}+${WIDTHOFF1}+${HEIGHTOFF1} &

sugain <data.su tpow=$tpow |
suxmovie perc=$perc \
	title="Data with tpow=$tpow perc=$perc" \
	windowtitle="tpow=$tpow perc=$perc" \
	label1="Time (sec)" label2="Offset (km)" \
	-geometry ${WIDTH}x${HEIGHT}+${WIDTHOFF2}+${HEIGHTOFF1} &

suspecfx <data.su  |
suxmovie  \
	title="FX spectrum" windowtitle="FX spectrum" \
	label1="Freq (Hz)" label2="Offset (km)" \
	-geometry ${WIDTH}x${HEIGHT}+${WIDTHOFF1}+${HEIGHTOFF2} &

f=0,15,40,50
amps=1.,1.,0.,0.
sufilter <data.su f=$f amps=$amps |
sugain tpow=$tpow |
suxmovie  perc=$perc \
	title="f=$f amps=$amps tpow=$tpow perc=$perc" \
	windowtitle="Low Pass" \
	label1="Time (sec)" label2="Offset (km)" \
	-geometry ${WIDTH}x${HEIGHT}+${WIDTHOFF2}+${HEIGHTOFF2} &

exit 0
